package cn.edu.bzu.group4.stockplus.dao;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.SessionFactoryUtils;

public abstract class HibernateDao {

    private SessionFactory sessionFactory;

	
    public void setSessionFactory(SessionFactory sessionFactory) {
        this.sessionFactory = sessionFactory;
    }
		
    public Session getSession() {
        return sessionFactory.getCurrentSession();
    }    
}
